<@override name="head">
<title>地域报表</title>
<link rel="stylesheet" href="${ctx}/assets/css/daterangepicker.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="${ctx}/assets/js/lib/moment.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.daterangepicker.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/date.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/commoncombobox.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/shortcutkey_datePicker.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/report_advertiser.js"></script>
</@override>
<@override name="body">
   <div id=content_bg>
   <#include "/main/home/common.ftl"/>
    <div id="pagecontent">
		<div id="content">
	   		<div id="navDiv">
				<ul id="navDiv_ul">
					<li><i class="icon-home"></i></li>
					<li><a href="${ctx}/advertiser/main/dashboard">首页</a></li>
					<li><i class="icon-angle-right"></i></li>
					<li><a href="${ctx}/advertiser/main/ad/report/advertiser-report">数据报表</a></li>
					<li><i class="icon-angle-right"></i></li>
				    <li class="navDiv_currentLi">地域报表</li>
				</ul>  
 			</div>
	 		<form id="myform" action="${ctx}/advertiser/main/ad/report/advertiser-report/regionReport" method="post">
	 			<input type="hidden" id="page" name="page" value="${pager.page!}"/>
	 			<input type="hidden" id="dateTab" name="dateTab" value="${dateTab!}"/>
				<input type="hidden" name="selectedadvertiserId" id="advertiserId" value="${advertiserId!}"/>
				<input type="hidden" name="selectedadvertiserName" id="advertiserName" value="${selectedadvertiserName!}"/>
				<input type="hidden" name="selectedorderId" id="orderId" value="${orderId!}"/>
				<input type="hidden" name="selectedorderName" id="orderName" value="${selectedorderName!}"/>
				
				<div id="content_choose">	
					<span id="dateChoose_span">
						<a value="today">今天</a> |
						<a id="yesterday" value="yesterday">昨天</a> |
						<a value="lastSevenDays">前七天</a> |
						<a value="lastWeek">上周</a> |
						<a value="thisMonth">本月</a> |
						<a value="lastMonth">上月</a> 
					</span>
					<span id="calendar_span">
						<i class="icon-calendar"></i>   
						<input type="text" name="dateRangePicker" id="dateRangePicker" value="${dateRangePicker!}" readonly/>
					</span>
				</div>
				<div class="selector operator">
					<div class="sl-wrap single">
						<div class="sl-key">
							<span>广告主：</span>
						</div>
						<div class="sl-value">
							<div class="sl-v-list">
								<ul class="valueList">
									<li class="select_change" value=""><a><i></i>全部</a></li>
								</ul>
							</div>
							<div class="sl-btns">
								<a class="btn btn-primary btnsConfirm disabled" href="javascript:">确定</a>
								<a class="btn btn-default btnsCancel" href="javascript:">取消</a>
							</div>
							<div class="sl-ext">
								<a class="sl-e-multiple extMultiple" href="javascript:">多选<i></i></a>
							</div>
						</div>
					</div>	
				</div>
				<div class="selector size">
					<div class="sl-wrap single">
						<div class="sl-key">
							<span>订单：</span>
						</div>
						<div class="sl-value">
							<div class="sl-v-list">
								<ul class="valueList">
									<li class="select_change" value=""><a><i></i>全部</a></li>
								</ul>
							</div>
							<div class="sl-btns">
								<a class="btn btn-primary btnsConfirm disabled" href="javascript:">确定</a>
								<a class="btn btn-default btnsCancel" href="javascript:">取消</a>
							</div>
							<div class="sl-ext">
								<a class="sl-e-multiple extMultiple" href="javascript:">多选<i></i></a>
							</div>
						</div>
					</div>	
				</div>
				
			    <div style="margin:20px 0;">
			    	<input id="btn_formSubmit" type="submit" value="查询"/>
			    </div>
			    
				<table border="1" class="tableReport-advertiser">
					<thead>
						<tr class="theadTr">
							<td class="theadTd" style="width:10%">日期</td>
			               	<td class="theadTd" style="width:10%">地域(省-市)</td>     
			                <td class="theadTd" style="width:10%">曝光占比</td>
			                <td class="theadTd" style="width:10%">曝光数</td>
			                <td class="theadTd" style="width:10%">点击数</td>
			                <td class="theadTd" style="width:10%">点击率</td>
			                <td class="theadTd" style="width:10%">eCPM</td>
			                <td class="theadTd" style="width:10%">花费</td>
			            </tr>
			            <tr class="theadTr">
							<td class="theadTd" colspan=3>总计</td>
			                <td class="theadTd">${reports.shows!}</td>
			                <td class="theadTd">${reports.clicks!}</td>
			                <td class="theadTd">${reports.clickRates!}%</td>
			                <td class="theadTd">${reports.ecpms!}</td>
			                <td class="theadTd">${reports.consumes!}</td>
			            </tr>
					</thead>
					<tbody>
					<#if reportList ??>
		            <#list reportList as report>
						<tr class="tbodyTr">
							<#setting datetime_format="yyyy-MM-dd"/> 
							<td class="tbodyTd">${report.date!?datetime}</td>
			            	<td class="tbodyTd">${report.cn!}-${report.cnCity!}</td>
			            	<td class="tbodyTd hidden-impression">${report.showRate!}%</td>
			                <td class="tbodyTd hidden-impression">${report.show!}</td>
			                <td class="tbodyTd hidden-click">${report.click!}</td>
			                <td class="tbodyTd hidden-click">${report.clickRate!}%</td>  
			                <td class="tbodyTd hidden-consume">${report.ecpm!}</td>
			                <td class="tbodyTd hidden-consume">${report.consume!}</td>
			            </tr>
					</#list>
					</#if>
					</tbody>
				</table>
		        <div id="exportReport">
					<a id="exportExcel" class="btn_export" href="javascript:void(0);" onClick="exportExcel('location','${ctx}/advertiser/main/ad/report/advertiser-report/regionExcel')">导出Excel</a>
				</div>
				<div id="pageDiv">
					<#include "/common/pagination/simple.ftl"/>
				</div>
			</form>
		</div>
    </div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>